import onnxruntime as ort
import numpy as np

if __name__ == "__main__":
    ort_session = ort.InferenceSession("onnx_models/pytorch_conv1d.onnx")
    outputs = ort_session.run(None, {"input": np.random.randn(33, 16, 30).astype(np.float32)})
    print(outputs[0])

    ort_session = ort.InferenceSession("onnx_models/pytorch/pytorch_avg_pool1d.onnx")
    outputs = ort_session.run(None, {"input": np.random.randn(33, 16, 20).astype(np.float32)})
    print(outputs[0])

    ort_session = ort.InferenceSession("onnx_models/pytorch_relu.onnx")
    outputs = ort_session.run(None,
                              {"input": np.random.randn(2).astype(np.float32)})
    print(outputs[0])

    ort_session = ort.InferenceSession("onnx_models/pytorch/pytorch_abs.onnx")
    x = np.random.randn(10).astype(np.float32)
    print(x)
    outputs = ort_session.run(None, {"input": x})
    print(outputs[0])


